package com.ctshk.rpc.order.hotel.req;

import com.ctshk.rpc.hotel.req.HotelOrderContactPersonInfo;
import com.ctshk.rpc.hotel.req.HotelOrderRoomCustomerInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
@ApiModel(description="提交订单req")
public class HotelOrderSubmitReq implements Serializable {

    private static final long serialVersionUID = -87407566924151220L;

    @NotNull(message = "酒店id必传")
    @ApiModelProperty(value = "酒店id", required = true)
    private Long hotelId;

    @NotNull(message = "酒店产品id必传")
    @ApiModelProperty(value = "酒店产品id", required = true)
    private Long hotelProductId;

    @NotNull(message = "成本币种id必传")
    @ApiModelProperty(value = "酒店产品下单时的成本币种id", required = true)
    private Long costCurrencyId;

    @NotEmpty(message = "成本币种名称必传")
    @ApiModelProperty(value = "酒店产品下单时的成本币种名称", required = true)
    private String costCurrencyName;

    @NotNull(message = "成本币种汇率必传")
    @ApiModelProperty(value = "酒店产品下单时的成本币种汇率,此汇率是CRM汇率", required = true)
    private Double costExchangeRate;

    @ApiModelProperty(value = "酒店名称")
    private String hotelName;

    @ApiModelProperty(value = "酒店英文名称")
    private String hotelEnName;

    @ApiModelProperty(value = "房间产品名称")
    private String roomName;

    @ApiModelProperty(value = "酒店房间英文名称")
    private String roomEnName;

    @ApiModelProperty(value = "酒店产品名称")
    private String hotelProductName;

    @NotNull(message = "下单类型必传")
    @ApiModelProperty(value = "下单类型(1 散客,2 代理商,3 大客户-目前还没有)", example = "1", required = true)
    private Integer ordersType;

    @ApiModelProperty(value = "代理公司id")
    private Long agencyId;

    @ApiModelProperty(value = "代理公司")
    private String agencyCompany;

    @NotNull(message = "请填写入住日期")
    @ApiModelProperty(value = "入住日期", example = "2021-05-01", required = true)
    private LocalDate checkInDate;

    @NotNull(message = "请填写离店日期")
    @ApiModelProperty(value = "离店日期", example = "2021-05-03", required = true)
    private LocalDate checkOutDate;

    @NotNull(message = "晚数不能为空")
    @ApiModelProperty(value = "晚数", example = "3", required = true)
    private Integer nights;

    @NotNull(message = "房间数量不能为空")
    @ApiModelProperty(value = "间房（房间数量）", example = "3", required = true)
    private Integer roomNumber;

    @NotNull(message = "成人数不能为空")
    @ApiModelProperty(value = "成人数", example = "2", required = true)
    private Integer adultNum;

    @NotNull(message = "儿童数不能为空")
    @ApiModelProperty(value = "儿童数", example = "4", required = true)
    private Integer childrenNum;

    @NotNull(message = "房客总人数不能为空")
    @ApiModelProperty(value = "总人数(成人数+儿童数)", example = "6", required = true)
    private Integer peopleNum;

    @Valid
    @ApiModelProperty(value = "房间入住人信息", required = true)
    private List<HotelOrderRoomCustomerInfo> hotelOrderRoomCustomerInfos;

    @Valid
    @ApiModelProperty(value = "联系人信息", required = true)
    private HotelOrderContactPersonInfo hotelOrderContactPersonInfo;

    @ApiModelProperty(value = "会员ID")
    private String memberId;

    @ApiModelProperty(value = "使用积分", example = "300")
    private Integer usingPoints;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "推广码", example = "ZH423D")
    private String couponCode;

    @ApiModelProperty(value = "推广码减免金额")
    private BigDecimal couponDeduction;

    @NotNull(message = "单价不能为空")
    @Min(value = 0, message = "单价不能小于0")
    @ApiModelProperty(value = "单价", required = true)
    private BigDecimal unitPrice;

    @NotNull(message = "税费不能为空")
    @ApiModelProperty(value = "税费及其它费用", required = true)
    private BigDecimal taxation;

    @NotNull(message = "销售方式不能为空")
    @ApiModelProperty(value = "销售方式(1：单品销售(单项提交的) 2：打包销售(套票提交的))", example = "1", required = true)
    private Integer salesMethods;

    @ApiModelProperty(value = "是否含早")
    private Integer hasBreakfast;

    @ApiModelProperty(value = "会员查询类型(1 手机号查询;证件类型:" +
            "标准身份证 = 11" +
            "临时身份证 = 12" +
            "户口簿 = 13" +
            "解放军军官证 = 14" +
            "武警警官证 = 15" +
            "护照 = 16" +
            "港澳居民往来内地通行证/回乡证 = 17" +
            "台湾居民内地通行证/台胞证 = 18" +
            "港澳通行证 = 19" +
            "国际海员证 = 20" +
            "外国人永久居留证 = 21" +
            "驾驶证 = 22" +
            "社会保险卡 = 23" +
            "香港身份证 = 24" +
            "澳门身份证 = 25" +
            "其他身份证明文件(个人) = 99)", example = "1")
    private String vipType;
    @ApiModelProperty(value = "会员查询号码,手机号或者证件号", example = "131xxxxxx")
    private String vipSerachNo;
    @ApiModelProperty(value = "用户名")
    private String ctsLogin;
    @ApiModelProperty(value = "会员查询号码,手机号或者证件号", example = "131xxxxxx")
    private String vipPwssword;
}
